<?php
/**
 * Created by PhpStorm.
 * User: lub_lenovo
 * Date: 2017/11/29
 * Time: 11:23
 */

namespace app\admin\logic;


use tp5er\Backup;

class SystemLogic {

	/**
	 * SystemLogic constructor.
	 */
	public function __construct() {
	}

	public function backup(){
		$db=new Backup(['path'=>'./docs/backup/']);
		return $db->fileList();
	}

	public function doBackup(){
		$db=new Backup(['path'=>'./docs/backup/']);
		$list=$db->dataList();
		foreach ( $list as $k=>$v ) {
			$db->backup($v['name'],0);
		}
		return $db->fileList();
	}
}